Skip to content

ci: improve workflows#2288

Open
luc122c wants to merge 10 commits into
nuxt:mainfrom
luc122c:feat/improve-actions
Open

ci: improve workflows#2288
luc122c wants to merge 10 commits into
nuxt:mainfrom
luc122c:feat/improve-actions

Conversation

@luc122c

@luc122c luc122c commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

🔗 Linked issue

📚 Description

Hi, there are a few improvements that can be made to the workflows.

ubuntu-slim runner

Use ubuntu-slim for agent-scan.yml, reproduction.-close.yml and some inci.yml. The runner readme provides more info about the tools and the blog post gives some potential use cases.

persist-credentials: false

Use persist-credentials: false on every actions/checkout in ci.yml (none of the jobs perform subsequent git operations). See usage for more info.

Concurrency

Add concurrency to the PR-triggered workflows so a new push cancels the previous in-flight run of the same workflow. release-nightly.yml uses the cancel-in-progress: false as to not interrupt the release. Instead, it will queue the next release.

Related

@pkg-pr-new

pkg-pr-new Bot commented Jul 23, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nuxt/image@2288

commit: 7d79bc1

@codecov-commenter

codecov-commenter commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 32.61%. Comparing base (41790ef) to head (7d79bc1).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2288   +/-   ##
=======================================
  Coverage   32.61%   32.61%           
=======================================
  Files           7        7           
  Lines         371      371           
  Branches      131      131           
=======================================
  Hits          121      121           
  Misses        194      194           
  Partials       56       56           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@luc122c
luc122c marked this pull request as ready for review July 23, 2026 20:15
@luc122c
luc122c requested a review from danielroe as a code owner July 23, 2026 20:15
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0bbfa524-b70a-4182-bd35-73041a482f66

📥 Commits

Reviewing files that changed from the base of the PR and between 5c71993 and 7d79bc1.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/ci.yml

📝 Walkthrough

Walkthrough

GitHub Actions workflows now define concurrency behavior for CI and nightly releases. Checkout steps disable persisted credentials, the lint job uses the Node.js 24 release line, and selected jobs run on ubuntu-slim instead of ubuntu-latest.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and clearly points to workflow/CI improvements, which matches the main changes.
Description check ✅ Passed The description matches the workflow changes: ubuntu-slim, checkout credential settings, and concurrency.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Around line 55-56: Update the actions/checkout step in the changes job to set
persist-credentials to false, matching the hardened checkout configuration used
elsewhere in the workflow.

In @.github/workflows/release-nightly.yml:
- Around line 13-15: Update the workflow’s concurrency configuration to set the
pending-run queue behavior to max, preserving cancel-in-progress: false, so all
nightly release events are retained and processed sequentially in FIFO order.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0eb1dd76-1901-44b3-9d51-339741b76c84

📥 Commits

Reviewing files that changed from the base of the PR and between 41790ef and 5c71993.

📒 Files selected for processing (4)
  • .github/workflows/agent-scan.yml
  • .github/workflows/ci.yml
  • .github/workflows/release-nightly.yml
  • .github/workflows/reproduction-close.yml

Comment thread .github/workflows/ci.yml
Comment on lines +13 to +15
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.number || github.ref }}
cancel-in-progress: false

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'Workflow file:\n'
if [ -f .github/workflows/release-nightly.yml ]; then
  cat -n .github/workflows/release-nightly.yml | sed -n '1,80p'
else
  echo 'missing'
fi

printf '\nOther workflow concurrency snippets:\n'
rg -n "concurrency:|queue:|cancel-in-progress:" .github/workflows || true

printf '\nCurrent workflow trigger summary:\n'
python3 - <<'PY'
from pathlib import Path
p=Path('.github/workflows/release-nightly.yml')
if not p.exists():
    print('missing')
    raise SystemExit
for i,line in enumerate(p.read_text().splitlines(),1):
    if i<=40 and any(s in line for s in ['on:', 'workflow_dispatch', 'push', 'schedule', 'concurrency']):
        print(f'{i}: {line}')
PY

Repository: nuxt/image

Length of output: 3118


🌐 Web query:

GitHub Actions concurrency queue max behavior pending runs cancel-in-progress false

💡 Result:

In GitHub Actions, the behavior of a concurrency group when cancel-in-progress is false depends entirely on whether you are using the default single-queue behavior or the recently introduced extended queuing capability [1][2]. Default Behavior (Implicit queue: single) When you set cancel-in-progress: false (or omit it, as it defaults to false), GitHub Actions allows at most one job or workflow to be running and one to be in a pending state [1][3]. - If a new run is triggered while one is already running, it becomes the single pending run [3][4]. - If a subsequent (third) run is triggered while another is already pending, the existing pending run is canceled and replaced by the new run [1][4]. - This ensures that only the most recently triggered run is waiting to execute next, while the currently running job completes [4]. Extended Queuing Behavior (queue: max) As of May 2026, you can opt into a larger queue by setting queue: max in your concurrency block [2]. - This allows up to 100 jobs or workflow runs to be queued in a pending state within the same concurrency group [1][5]. - Runs are processed sequentially in the order they were queued [1][2]. - When the queue reaches its limit of 100, any additional incoming runs are canceled [1][5]. Important Constraints - You cannot combine queue: max with cancel-in-progress: true; doing so will result in a workflow validation error because they represent conflicting strategies for handling concurrent runs [1][6]. - The default behavior (queue: single) is essentially a queue of size 1 where new entries force the eviction of older ones [1][4]. The queue: max option allows for a true first-in-first-out (FIFO) queue for up to 100 items [1][2].

Citations:


Queue pending nightly releases sequentially.

With cancel-in-progress: false, GitHub Actions still defaults to a single pending run, so a burst of pushes can drop earlier nightly release events. Add queue: max if every release event should be processed in FIFO order.

Suggested configuration
 concurrency:
   group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.number || github.ref }}
   cancel-in-progress: false
+  queue: max
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.number || github.ref }}
cancel-in-progress: false
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.number || github.ref }}
cancel-in-progress: false
queue: max
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release-nightly.yml around lines 13 - 15, Update the
workflow’s concurrency configuration to set the pending-run queue behavior to
max, preserving cancel-in-progress: false, so all nightly release events are
retained and processed sequentially in FIFO order.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably a question for @danielroe, is it ok if nightly releases get dropped as long as the latest one is ok, or should all be published?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants